<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<% String path = request.getContextPath(); %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Login</title>
	<style type="text/css">
		.error{ color: red; }
	</style>
</head>
<body>
	<br/>
    <form action="<%=path %>/user/doLogin" method="post">
    	name:<input type="text" name="name" value="${user.name}" />
    	<span class="error">${name_required} ${name_too_short} ${name_too_long}</span><br/>
    	
    	pass:<input type="text" name="pass" value="${user.pass}" />
		<span class="error">${pass_required} ${pass_too_short} ${pass_too_long}</span><br/>
		
		<input type="submit" value="Login" /> <span class="error">${message}</span>
	</form><br/>
	
    <a href="<%=path %>/user/toAdd">免费注册</a>
</body>
</html>
